package com.nwu.records.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 生理明细表
 * @TableName physiology_details
 */
@TableName(value ="physiology_details")
@Data
public class PhysiologyDetails implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 关联的生理大类ID
     */
    private Long physiologyCategoriesId;

    /**
     * 详细生理情况
     */
    private String phyDetail;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PhysiologyDetails other = (PhysiologyDetails) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPhysiologyCategoriesId() == null ? other.getPhysiologyCategoriesId() == null : this.getPhysiologyCategoriesId().equals(other.getPhysiologyCategoriesId()))
            && (this.getPhyDetail() == null ? other.getPhyDetail() == null : this.getPhyDetail().equals(other.getPhyDetail()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPhysiologyCategoriesId() == null) ? 0 : getPhysiologyCategoriesId().hashCode());
        result = prime * result + ((getPhyDetail() == null) ? 0 : getPhyDetail().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", physiologyCategoriesId=").append(physiologyCategoriesId);
        sb.append(", phyDetail=").append(phyDetail);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}